import request from '@/utils/request'

// 保存菜单权限
export function saveTreeRight(data) {
  return request({
    url: '/sys/right/saveTreeRight',
    method: 'post',
    data: data
  })
}

// 清空自身权限
export function clearSelfRight(data) {
  return request({
    url: '/sys/right/clearSelfRight',
    method: 'post',
    data: data
  })
}

// 查询菜单权限
export function rightData(data) {
  return request({
    url: '/sys/menu/rightData',
    method: 'get',
    params: data
  })
}
// 删除权限
export function deleteRight(ids) {
  return request({
    url: '/sys/right/delete',
    method: 'delete',
    data: { ids: ids }
  })
}
export function listRight(ids) {
  return request({
    url: '/sys/right/delete',
    method: 'delete',
    data: { ids: ids }
  })
}
export function allRightKey() {
  return request({
    url: '/sys/right/allRightKey',
    method: 'get'
  })
}
export function saveRight(data) {
  return request({
    url: '/sys/right/saveRight',
    method: 'post',
    data: data
  })
}
